473,467 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Image Button and Post Method Help

I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...

Jul 16 '05 #1
5 12569
RG

"Ralph Freshour" <ra***@primemail.com> wrote in message
news:ek********************************@4ax.com...
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...

<input type="image" border="0" src="images/login.gif" alt="Trade Login">
RG


Jul 16 '05 #2

"Ralph Freshour" <ra***@primemail.com> wrote in message:
news:ek********************************@4ax.com...
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...


I hope this will work for you:

<a href="javascript:document.formname.submit()">
<img src='button.gif' alt='button' border=0></a>

-
Kindest Regards,
Olexiy Merenkov
http://www.merenkov.com/olexiy
Jul 16 '05 #3
I don't understand what this js code does:

<a href="javascript:document.formname.submit()">

Don't I need a method post statement in my form?
I have several graphical image 'buttons' - when the form is submitted
how will the called .php script know which 'button' was clicked on?
On Tue, 5 Aug 2003 13:04:27 +0300, "???????? ??????? ???????"
<al**@zaporizhstal.com> wrote:

"Ralph Freshour" <ra***@primemail.com> wrote in message:
news:ek********************************@4ax.com.. .
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...


I hope this will work for you:

<a href="javascript:document.formname.submit()">
<img src='button.gif' alt='button' border=0></a>

-
Kindest Regards,
Olexiy Merenkov
http://www.merenkov.com/olexiy


Jul 16 '05 #4
Ralph Freshour <ra***@primemail.com> writes:
<al**@zaporizhstal.com> wrote:
"Ralph Freshour" <ra***@primemail.com> wrote in message:
I'm trying to use an image as a submit button - I'm reading Sams Teach
I hope this will work for you:
It doesn't work for me.
<a href="javascript:document.formname.submit()">
<img src='button.gif' alt='button' border=0></a>


I don't understand what this js code does:

<a href="javascript:document.formname.submit()">


It, in browsers with Javascript enabled, possibly submits the form
where the opening <form> tag has the name attribute name="formname".

In browsers with Javascript disabled it does absolutely nothing, apart
from really winding up the user when they discover the form won't
submit. This is a bigger problem with longer forms.

For a better solution, you should read
http://www.cs.tut.fi/~jkorpela/forms/index.html
and especially
http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html
Don't I need a method post statement in my form?
<form method="post" action="submittothis.php">

You don't necessarily need it, forms *can* be submitted with 'get'
instead, though whether you *should* or not depends on what the form does.
I have several graphical image 'buttons' - when the form is submitted
how will the called .php script know which 'button' was clicked on?


http://ppewww.ph.gla.ac.uk/%7eflavell/www/trysub.html

--
Chris
Jul 16 '05 #5
OK, I got it to work and now when I click on one of my image 'buttons'
I can detect which one - however, now I'm reading and trying to see
how to call the correct php script based on what was clicked on.

On my home page I call via post method a dispatch.php script and in
that script I detect which button was clicked on - how do I just call
another php script? For example, if I click on Create I would need to
call the create.php script, if I click on Delete I need to call
delete.php

Thanks...
On Tue, 5 Aug 2003 08:46:32 -0700, "RG" <Me@NotTellingYa.com> wrote:

"Ralph Freshour" <ra***@primemail.com> wrote in message
news:ek********************************@4ax.com.. .
I'm trying to use an image as a submit button - I'm reading Sams Teach
Yourself HTML and the chapter on this doesn't show me the details on
how this is done - I mean I can't seem to see it or grasp how this
works?

I see the tag for the image and I assume I need a form get or post
line but how are the two connected so the clicking on the image button
activates the post method?

Thanks...

<input type="image" border="0" src="images/login.gif" alt="Trade Login">
RG


Jul 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
In the following code, I have 2 questions regarding submit button with image. 1) Does this code <input type="image" name="populate" src="populate.gif"> behave the same as an HTML submit button...
15
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and...
4
by: David W. Simmonds | last post by:
Is there a way I can have a button on a ASP.NET form that when clicked will allow the user to save the image to a file on the client side? I know that the user can simply rclick the image and...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
1
by: Chuck Anderson | last post by:
I'm using a simple, pseudo progress bar. Very simply, I display a still image next to a form submit button until the user clicks on it, and then I change the image source to an animated version of...
16
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the...
2
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but...
2
by: smokeyd | last post by:
i am trying to create a simple image button rollover.. i have searched this forum and found a number of solutions but none seem to work. i am just trying to get the onmouseover to swap the image...
1
by: sourcie | last post by:
I am changing an existing quiz found on "JavaScriptKit.com Multiple Choice Quiz" I have an image. Instead of using the radio buttons with the normal true/false question, I want to place two...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.